package com.ginmeta.domain.system.vo;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;

import java.io.Serial;
import java.io.Serializable;

/**
 * 用户参数实体
 * @author GinMeta
 */
@Data
@SuperBuilder
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class UserEditPasswordReqVO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 用户id
     */
    @NotNull(message = "操作对象不能为空")
    private Long userId;

    /**
     * 旧密码
     */
    @Size(message = "原密码长度为6~16位", min = 6, max = 16)
    @NotBlank(message = "原密码不能为空")
    private String oldPassword;

    /**
     * 新密码
     */
    @Size(message = "新密码长度为6~16位", min = 6, max = 16)
    @NotBlank(message = "新密码不能为空")
    private String newPassword;
}
